package com.itheima.d13_extends_visit;

class Z extends F {
    String name = "子类名称";

    @Override
    public void print1() {
        System.out.println("==子类的print1方法执行了=");
    }


    public void showName() {
        String name = "局部名称";
        // 局部变量访问
        System.out.println("name = " + name);
        // 子类成员变量访问
        System.out.println("this.name = " + this.name);
        // 父类的成员变量访问
        System.out.println("super.name = " + super.name);
    }


    public void showMethod() {

        // 访问本类方法print1
        print1();
        // 访问父类方法print1
        super.print1();
    }
}
